export default {
    state: {
        token: localStorage.getItem('token') || null
    },
    mutations: {
        setToken(state, token) {
            state.token = token
        }
    },
    actions: {
        refreshToken(state, token){
            state.commit("setToken", token)
        }
    }
}